package cn.hnucm.orderservice.service;

import cn.hnucm.orderservice.entity.TbCapital;
import cn.hnucm.orderservice.mapper.TbCapitalMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 账单明细 服务类
 * </p>
 *
 * @author chenjintao
 * @since 2021-12-06 ${time}
 */
public interface TbCapitalService extends IService<TbCapital> {
    //获取一个用户的所有支出账单
    List<TbCapital> getUserFromCapital(Integer userId);
    //获取一个用户的的收入账单
    List<TbCapital> getUserToCapital(Integer userId);
    //获取一个用户的所有账单
    List<TbCapital> getUserAllCapital(Integer userId);
    //查询一个用户的一段时间内的账单
    List<TbCapital> getUserSometiomeCapital(Integer userId,String beginTime,String endTime);
    //根据账单号获取账单
    TbCapital getUserOneCapital(Integer capitalId);
    //插入一个账单
    boolean addCapital(TbCapital tbCapital);
    //删除一个账单
    boolean deleteCapital(Integer capitalId);

}
